package com.cooper.dao.admin;

import net.paoding.rose.jade.annotation.DAO;
import net.paoding.rose.jade.annotation.Insert;
import net.paoding.rose.jade.annotation.ReturnGeneratedKeys;
import net.paoding.rose.jade.annotation.SQL;
import net.paoding.rose.jade.annotation.Update;

import com.cooper.entity.PageDetailEntity;

@DAO
public interface PageDetailDAO {
	
	static final String TABLE_NAME = "d_page_detail";
	
	@ReturnGeneratedKeys
	@Insert(tableName=TABLE_NAME)
	Long saveEntity(PageDetailEntity entity) throws Exception;
	
	@Update(tableName=TABLE_NAME)
	boolean updateEntity(PageDetailEntity entity) throws Exception;
	
	@SQL("select * from d_page_detail t where deleted='n' and id=:1 ")
	PageDetailEntity loadById(long id) throws Exception;

}
